<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="./Deepclone.js"></script>
  <script src='./shallowClone.js'></script>
</head>

<body>
  <script>
    const obj = {
      a: 1,
      b: ['e', 'g', 't'],
      c: {
        h: 20
      },
      d: function () {}
    }
    obj.b.push(obj.c)
    obj.c.j = obj.b
    //console.log("deepClone1----", deepClone1(obj))
    //console.log("deepClone2----", deepClone2(obj))
    console.log("deepClone3----", deepClone3(obj))
    const obj1 = {
      a: 1,
      b: ['e', 'g', 't'],
      c: {
        h: 20
      },
      d: function () {}
    }
    console.log("shallowClone1(obj1)---------", shallowClone1(obj1))
    obj1.c.h = 55
    console.log("shallowClone2(obj1)---------", shallowClone2(obj1))
  </script>
</body>

</html>